package com.dd.admin.business.category.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dd.admin.common.model.PageFactory;
import com.dd.admin.business.category.entity.Category;
import com.dd.admin.business.category.mapper.CategoryMapper;
import com.dd.admin.business.category.service.CategoryService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import com.dd.admin.business.category.domain.CategoryVo;
import com.dd.admin.business.category.domain.CategoryDto;
import java.util.List;

/**
 * <p>
 * 分类 服务实现类
 * </p>
 *
 * @author 727869402@qq.com
 * @since 2024-05-22
 */
@Service
public class CategoryServiceImpl extends ServiceImpl<CategoryMapper, Category> implements CategoryService {

    @Override
    public IPage<CategoryVo> selectCategoryPage(CategoryDto categoryDto) {
        Page page = PageFactory.defaultPage();
        return baseMapper.selectCategoryPage(page,categoryDto);
    }

    @Override
    public List<CategoryVo> selectCategoryList(CategoryDto categoryDto) {
        return baseMapper.selectCategoryList(categoryDto);
    }
}
